<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
</head>
<body>
	<p id="test">javascript</p>
</body>
	<script>
	    //
		var smail = 10;
		var biger = 70;
		var test = document.getElementById("test");
		function test1(){
			test.style.fontSize = smail+"px";
			smail++;
			if(smail == 70){
				smail = 10;
				clearInterval(t1);
				t2 = setInterval(test2,50);
			}

		}

		function test2(){
			test.style.fontSize = biger+"px";
			biger--;
			if(biger == 10){
				biger = 70;
				clearInterval(t2);
				t1 = setInterval(test1,50);
			}

		}
		var t1 = setInterval(test1,50),t2;
	</script>
</html>